import { axios } from "../utils/request";

const api = {
    list: "/sys/agreement/list",
    save: "/sys/agreement/save",
    historyList: "/sys/agreement/historyList",
    getAgreement: "/public/getAgreement"
};

/**
 * 获取 协议集合
 */
export function list(parameter) {
  return axios({
    url: api.list,
    method: "get",
    params: parameter
  });
}

/**
 * 获取 协议历史集合
 */
export function historyList(parameter) {
  return axios({
    url: api.historyList,
    method: "get",
    params: parameter
  });
}

/**
 * 保存 协议
 */
export function save(data) {
  return axios({
    url: api.save,
    method: "post",
    data: data
  });
}

/**
 * 获取 协议
 */
export function getAgreement(parameter) {
  return axios({
    url: api.getAgreement,
    method: "get",
    params: parameter
  });
}


